#!/bin/bash
mongo 127.0.0.1:27017/admin > /tmp/plugininit.log <<EOF
use com-foxit-plugin

db.activation.save({ "_id" : { "$oid" : "52b6c494e4b0e12b2b356b46" }, "_class" : "com.foxit.plugin.entity.Activation", "rule" : "(hn==\"Foxit Reader\"&&(hv==\"6.1.0.0808\"||hv==\"6.1.0.0809\")&&hl==\"zh_cn\")||(1==1)||((area==\"ZZ\"))||(ip==\"64.125.119.210\"||ip==\"64.146.180.235\"||ip==\"58.22.7.137\"||ip==\"58.22.7.138\"||ip==\"58.22.7.139\"||ip==\"58.22.7.140\"||ip==\"58.22.7.141\"||ip==\"58.22.7.142\"||ip==\"218.85.73.58\"||ip==\"218.246.107.88\"||ip==\"218.246.107.89\"||ip==\"218.246.107.90\"||ip==\"64.62.194.23\"||ip==\"111.243.11.75\"||ip==\"107.20.51.49\"||ip==\"61.152.249.78\"||ip==\"175.42.22.251\"||ip==\"218.246.107.87\"||ip==\"23.20.214.15\"||ip==\"192.168.0.1\"||area==\"CN\")", "readMoreUrl" : "", "description" : "" });


db.rule.save({ "_id" : { "$oid" : "5209aaebe4b0844467520d38" }, "_class" : "com.foxit.plugin.entity.Rule", "name" : "reader6.0", "value" : "1==1", "used" : false });
db.rule.save({ "_id" : { "$oid" : "5209c057e4b0844467520d39" }, "_class" : "com.foxit.plugin.entity.Rule", "name" : "英文版reader 6.1.0.0808", "value" : "hn==\"Foxit Reader\"&&hv==\"6.1.0.0808\"&&hl==\"en_us\"", "used" : false });
db.rule.save({ "_id" : { "$oid" : "5209c19de4b0844467520d3a" }, "_class" : "com.foxit.plugin.entity.Rule", "name" : "英文版reader 全版本", "value" : "hn==\"Foxit Reader\"&&hl==\"en_us\"&&(hv==\"6.1.0.0808\"||hv==\"6.1.0.0809\")", "used" : false });
db.rule.save({ "_id" : { "$oid" : "520afddae4b035157ae4b618" }, "_class" : "com.foxit.plugin.entity.Rule", "name" : "英文phantom", "value" : "hn==\"Foxit Phantom\"&&hl==\"en_us\"", "used" : false });
db.rule.save({ "_id" : { "$oid" : "520afe12e4b035157ae4b619" }, "_class" : "com.foxit.plugin.entity.Rule", "name" : "all free reader", "value" : "hn==\"Foxit Reader\"&&ht==\"Free\"", "used" : false });
db.rule.save({ "_id" : { "$oid" : "520b1e53e4b035157ae4b620" }, "_class" : "com.foxit.plugin.entity.Rule", "name" : "enterprise reader", "value" : "hn==\"Foxit Reader\"&&ht==\"Enterprise\"", "used" : false });
db.rule.save({ "_id" : { "$oid" : "520b241ee4b035157ae4b622" }, "_class" : "com.foxit.plugin.entity.Rule", "name" : "cn reader", "value" : "hn==\"Foxit Reader\"&&(hv==\"6.1.0.0808\"||hv==\"6.1.0.0809\")&&hl==\"zh_cn\"", "used" : false });
db.rule.save({ "_id" : { "$oid" : "520b281ae4b0fd28239642a8" }, "_class" : "com.foxit.plugin.entity.Rule", "name" : "test_fan", "value" : "hv>61", "used" : false });
db.rule.save({ "_id" : { "$oid" : "520b51a3e4b0ed7ef8f262ac" }, "_class" : "com.foxit.plugin.entity.Rule", "name" : "test_fan2", "value" : "(hv==\"6.1.0.0808\"||hv==\"6.1.0.0809\")", "used" : false });
db.rule.save({ "_id" : { "$oid" : "520b573ce4b087b261800da9" }, "_class" : "com.foxit.plugin.entity.Rule", "name" : "xiezai3", "value" : "hn==\"Foxit Reader\"&&hl==\"en_us\"&&pv>=1.0.0.2", "used" : false });
db.rule.save({ "_id" : { "$oid" : "520b580fe4b087b261800daa" }, "_class" : "com.foxit.plugin.entity.Rule", "name" : "xiezai4", "value" : "hn==\"Foxit Reader\"&&hl==\"en_us\"&&pv>1.0.0.2", "used" : false });
db.rule.save({ "_id" : { "$oid" : "520b5888e4b087b261800dab" }, "_class" : "com.foxit.plugin.entity.Rule", "name" : "xiezai5", "value" : "hn==\"Foxit Reader\"&&hl==\"en_us\"&&pv==1.0.0.2", "used" : false });
db.rule.save({ "_id" : { "$oid" : "520c3605e4b03a6653b58b6a" }, "_class" : "com.foxit.plugin.entity.Rule", "name" : "ip_fan", "value" : "ip==\"192.168.1.252\"", "used" : false });
db.rule.save({ "_id" : { "$oid" : "520c50d7e4b03a6653b58b6c" }, "_class" : "com.foxit.plugin.entity.Rule", "name" : "reader17", "value" : "hn==\"Foxit Reader\"&&(hl==\"en_us\")&&ht==\"Free\"", "used" : false });
db.rule.save({ "_id" : { "$oid" : "520c6522e4b03a6653b58b6e" }, "_class" : "com.foxit.plugin.entity.Rule", "name" : "reader18", "value" : "hn==\"Foxit Reader\"&&hl==\"en_us\"&&pv==\"1.0.0.815\"", "used" : false });
db.rule.save({ "_id" : { "$oid" : "520c7c2fe4b03a6653b58b75" }, "_class" : "com.foxit.plugin.entity.Rule", "name" : "reader20", "value" : "hn==\"Foxit Reader\"&&(ht==\"Free\"||ht==\"Enterprise\")&&(pv==\"1.0.0.815\"||pv==\"1.0.1.816\")", "used" : false });
db.rule.save({ "_id" : { "$oid" : "520c800ee4b03a6653b58b79" }, "_class" : "com.foxit.plugin.entity.Rule", "name" : "reader-eason", "value" : "pv==\"1.0.0.0\"", "used" : false });
db.rule.save({ "_id" : { "$oid" : "520c81b3e4b03a6653b58b7b" }, "_class" : "com.foxit.plugin.entity.Rule", "name" : "reader21", "value" : "hn==\"Foxit Reader\"&&(ht==\"Free\"||ht==\"Enterprise\")&&(ov==\"Windows 7\"||ov==\"Windows XP\")", "used" : false });
db.rule.save({ "_id" : { "$oid" : "520c87d1e4b03a6653b58b7d" }, "_class" : "com.foxit.plugin.entity.Rule", "name" : "reader23", "value" : "hn=\"Foxit Reader\"&&(hv==\"6.1.0.0808\"||hv==\"6.1.0.0813\")&&hl==\"en_us\"&&(ov==\"Windows XP 64\"||ov==\"Windows 8\"||ov==\"Windows 7\")", "used" : false });
db.rule.save({ "_id" : { "$oid" : "520c91e4e4b03a6653b58b7e" }, "_class" : "com.foxit.plugin.entity.Rule", "name" : "reader24", "value" : "hn=\"Foxit Reader\"&&(hv==\"6.1.0.0808\"||hv==\"6.1.0.0813\")&&hl==\"en_us\"&&ht==\"Free\"&&(ov==\"Windows 7\"||ov==\"Windows 8\")", "used" : false });
db.rule.save({ "_id" : { "$oid" : "520c9494e4b03a6653b58b81" }, "_class" : "com.foxit.plugin.entity.Rule", "name" : "reader27", "value" : "hn==\"Foxit Reader\"&&pv==\"1.0.1.816\"", "used" : false });
db.rule.save({ "_id" : { "$oid" : "520c9b74e4b03a6653b58b86" }, "_class" : "com.foxit.plugin.entity.Rule", "name" : "reader28", "value" : "hn==\"Foxit Reader\"&&hl==\"en_us\"&&ht==\"Enterprise\"", "used" : false });
db.rule.save({ "_id" : { "$oid" : "520c9ea3e4b03a6653b58b88" }, "_class" : "com.foxit.plugin.entity.Rule", "name" : "reader29", "value" : "hn==\"Foxit Reader\"&&hl==\"zh_cn\"&&pv==\"1.0.1.816\"", "used" : false });
db.rule.save({ "_id" : { "$oid" : "520ca0e0e4b03a6653b58b89" }, "_class" : "com.foxit.plugin.entity.Rule", "name" : "reader26", "value" : "hn=\"Foxit Reader\"&&(hv==\"6.1.0.0809\"||hv==\"6.1.0.0813\")&&hl==\"en_us\"&&ov==\"Windows 7\"&&pv==\"1.1.0.818\"&&ht==\"Free\"", "used" : false });
db.rule.save({ "_id" : { "$oid" : "520dc084e4b03a6653b58b8b" }, "_class" : "com.foxit.plugin.entity.Rule", "name" : "reader1_vv", "value" : "hn==\"Foxit Reader\"&&hv==\"6.1.0.0815\"&&hl==\"en_us\"&&pv==\"1.0.0.816\"", "used" : false });
db.rule.save({ "_id" : { "$oid" : "520dc438e4b03a6653b58b8e" }, "_class" : "com.foxit.plugin.entity.Rule", "name" : "reader2_vv", "value" : "hn==\"Foxit Reader\"&&hv==\"6.1.0.0815\"&&hl==\"en_us\"&&pv==\"1.0.1.817\"\r\n", "used" : false });
db.rule.save({ "_id" : { "$oid" : "520dd905e4b03a6653b58b95" }, "_class" : "com.foxit.plugin.entity.Rule", "name" : "reader3_vv", "value" : "hn==\"Foxit Reader\"&&hv==\"6.1.0.0815\"&&hl==\"en_us\"&&ht==\"Free\"", "used" : false });
db.rule.save({ "_id" : { "$oid" : "5211fad8e4b0a7fcbd07ccf8" }, "_class" : "com.foxit.plugin.entity.Rule", "name" : "内测试ip地址", "value" : "ip==\"64.125.119.210\"||ip==\"64.146.180.235\"||ip==\"58.22.7.137\"||ip==\"58.22.7.138\"||ip==\"58.22.7.139\"||ip==\"58.22.7.140\"||ip==\"58.22.7.141\"||ip==\"58.22.7.142\"||ip==\"218.85.73.58\"||ip==\"218.246.107.88\"||ip==\"218.246.107.89\"||ip==\"218.246.107.90\"||ip==\"64.62.194.23\"||ip==\"111.243.11.75\"||ip==\"107.20.51.49\"||ip==\"61.152.249.78\"||ip==\"175.42.22.251\"||ip==\"218.246.107.87\"||ip==\"23.20.214.15\"||ip==\"192.168.0.1\"||area==\"CN\"", "used" : false });
db.rule.save({ "_id" : { "$oid" : "5234689be4b00d7a32c20220" }, "_class" : "com.foxit.plugin.entity.Rule", "name" : "CN 激活", "value" : "(area==\"CN\")", "used" : false });
db.rule.save({ "_id" : { "$oid" : "5277b62be4b021c035ab35ba" }, "_class" : "com.foxit.plugin.entity.Rule", "name" : "福州it", "value" : "ip==\"192.168.0.1\"", "used" : false });
db.rule.save({ "_id" : { "$oid" : "52de2ed0e4b04d4c56073a0a" }, "_class" : "com.foxit.plugin.entity.Rule", "name" : "内网", "value" : "(area==\"ZZ\")", "used" : false });
db.rule.save({ "_id" : { "$oid" : "52e4e696e4b090dada550f9f" }, "_class" : "com.foxit.plugin.entity.Rule", "name" : "Phantom ", "value" : "hn==\"Foxit PhantomPDF\"&&hv==\"6.0.15.0313\"&&ip==\"192.168.0.1\"", "used" : false });
db.rule.save({ "_id" : { "$oid" : "52e4e716e4b090dada550fa0" }, "_class" : "com.foxit.plugin.entity.Rule", "name" : "Reader chajiang", "value" : "hn==\"Foxit Reader\"&&ip==\"192.168.0.1\"", "used" : false });
db.rule.save({ "_id" : { "$oid" : "52e5349fe4b0d6eaa4444a7c" }, "_class" : "com.foxit.plugin.entity.Rule", "name" : "发布规则测试hn==reader限制", "value" : "hn==\"Foxit Reader\"&&(ip==\"64.125.119.210\"||ip==\"64.146.180.235\"||ip==\"58.22.7.137\"||ip==\"58.22.7.138\"||ip==\"58.22.7.139\"||ip==\"58.22.7.140\"||ip==\"58.22.7.141\"||ip==\"58.22.7.142\"||ip==\"218.85.73.58\"||ip==\"218.246.107.88\"||ip==\"218.246.107.89\"||ip==\"218.246.107.90\"||ip==\"64.62.194.23\"||ip==\"111.243.11.75\"||ip==\"107.20.51.49\"||ip==\"61.152.249.78\"||ip==\"175.42.22.251\"||ip==\"218.246.107.87\"||ip==\"23.20.214.15\"||ip==\"192.168.0.1\"||area==\"CN\")\r\n", "used" : false });
db.rule.save({ "_id" : { "$oid" : "52e5ff06e4b0d6eaa4444a7d" }, "_class" : "com.foxit.plugin.entity.Rule", "name" : "无限制", "value" : "ip==\"64.125.119.210\"||ip==\"64.146.180.235\"||ip==\"58.22.7.137\"||ip==\"58.22.7.138\"||ip==\"58.22.7.139\"||ip==\"58.22.7.140\"||ip==\"58.22.7.141\"||ip==\"58.22.7.142\"||ip==\"218.85.73.58\"||ip==\"218.246.107.88\"||ip==\"218.246.107.89\"||ip==\"218.246.107.90\"||ip==\"64.62.194.23\"||ip==\"111.243.11.75\"||ip==\"107.20.51.49\"||ip==\"61.152.249.78\"||ip==\"175.42.22.251\"||ip==\"218.246.107.87\"||ip==\"23.20.214.15\"||ip==\"192.168.0.1\"||area==\"CN\"", "used" : false });
db.rule.save({ "_id" : { "$oid" : "52e64028e4b0d650514948a2" }, "_class" : "com.foxit.plugin.entity.Rule", "name" : "HP定制", "value" : "hn==\"Foxit PhantomPDF\"&&(ip==\"192.168.0.1\"||area==\"CN\")&&ht==\"NA1311\"&&hl==\"zh_cn\"", "used" : false });
db.rule.save({ "_id" : { "$oid" : "531db038e4b038ffe2e5a74d" }, "_class" : "com.foxit.plugin.entity.Rule", "name" : "新公司内网", "value" : "area==\"US\"", "used" : false });
db.rule.save({ "_id" : { "$oid" : "531db5ace4b038ffe2e5a74e" }, "_class" : "com.foxit.plugin.entity.Rule", "name" : "新公司地址", "value" : "hn==\"Foxit Reader\"&&(ip==\"58.22.60.35\"||ip==\"58.22.60.34\"||ip==\"58.22.60.36\"||ip==\"58.22.60.37\"||ip==\"112.5.141.172\"||ip==\"112.5.141.173\"||ip==\"112.5.141.174\"||ip==\"112.5.141.176\"||ip==\"112.5.141.177\")", "used" : false });
db.rule.save({ "_id" : { "$oid" : "53661b95e4b0505e980a9a4d" }, "_class" : "com.foxit.plugin.entity.Rule", "name" : "foxit reader 7.0", "value" : "hv==\"7.0.0.0721\"&&hl==\"en_us\"", "used" : false });
EOF
touch /tmp/PLUGININITED
